home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Serious Demos / Symbolic Composer 4.2 / Environment / System / SYMBOL / Symbol Generators / Expansions / gen-expansion-parallel-var < prev   
Lisp/Scheme  |  1998-10-23  |  1KB  |  38 lines

  1. gen-expansion-parallel-var distance preserve template expansion
  2.  
  3. This implements a stochastic morph scheme, yielding in broken structures. Brownian noise is added onto each expansion on each iteration, the length and transposition position which is determined by the seed form. Noise accumulates and breaks down the initial expansion forms. The preserve parameter determines how many repeats each new form will preserve after a new amount of noise is added.
  4.  
  5. Visualize this several times, to get the effec. Here the randomized form preserves 3 repeats. 
  6.  
  7. (setq symbols 
  8.       (gen-expansion-parallel-var 
  9.        (pick-random '(2 3 4)) 3 
  10.        (symbol-repeat 32 '(a c d a -b -f)) 
  11.        (list (setq seed (gen-random nil 8 '(a b c d e f))) 
  12.              (symbol-inversion 'a seed))))
  13.  
  14. (symbol-repeat 32 '(a c d a -b -f)) determines the general  shape. Try defsym shapes instead.
  15.  
  16. (defsym a '(a b c))
  17. (defsym b '(b a c))
  18.  
  19. (setq symbols
  20.       (gen-expansion-parallel-var 4 2
  21.            (symbol-repeat 6 (gen-trans a 4))
  22.            (list (setq seed (gen-trans a 2))
  23.                  (symbol-inversion 'a seed))))
  24.  
  25. (gen-expansion-parallel-var 3 10 
  26.      (flatten (cons-n '(a b c b c d c d e d e f e f g) 20))
  27.      (list '(a b c d c b a)
  28.             (symbol-inversion 'a '(a b c d c b a))))
  29.  
  30. (gen-expansion-parallel-var 3 5 
  31.      (flatten (cons-n '(a b c b c d c d e d e f e f g) 20))
  32.      (list '(a b c d c b a)
  33.             (symbol-inversion 'a '(a b c d c b a))))
  34.  
  35.  
  36.  
  37.  
  38.